The new #states system in Drupal 7âs Form API enables you to quickly add dependencies between form elements, transitions between arbitrary states of a form and on-the-fly input validation. In this talk, youâll get to know how you can use the system to enhance your own forms without writing any boilerplate JavaScript code. All you have to do is to declare in what state your form should be when something happensâthe #states system will do the rest for you!
In case #states doesnât yet exactly do what you want, youâll also learn how to extend it with your own transitions, conditions and events. Itâs also possible to add custom form validation.
For the curious, weâll also have a look at the internals of the #states system and examine its mechanisms so that youâll be able to fully comprehend the magic that goes on behind the scenes.
Agenda
* Tour of the #states system
* Adding interactivity to your forms
* Extending #states
* Internals of the #states system
Biography
Konstantin Käfer is currently studying IT Systems Engineering at the Hasso Plattner Institute in Potsdam, Germany. For his bachelorâs degree, he is building a multi-touch floor and researching how users interact with a floor. He also works as a consultant for NowPublic, a crowd-powered news website using Drupal. He joined the Drupal community as a Google Summer of Code Student in 2006. Together with Emma Jane Hogbin, he authored the theming book âFront End Drupalâ.